[codex] Fix MiniMax CN percent-only usage rows#539
Merged
Conversation
📝 WalkthroughWalkthroughThe MiniMax provider plugin is updated to support token remaining information as percent-based values when count-based totals are missing or not displayable after endpoint-aware scaling. Documentation reflects Token Plan API endpoints; implementation adds fallback logic; tests verify behavior. ChangesMiniMax Token Plan Remaining Percent Fallback
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
limit: 0after model-call-to-prompt scaling.model_name: "general", and document the Token Plan percent output shape.Context
References #531. This keeps the follow-up small and avoids merging the stale #531 branch after #534 changed the same parser.
The commit includes:
Co-authored-by: lyizhou <yiouliu2333@gmail.com>Validation
bun run test -- plugins/minimax/plugin.test.js --runSummary by cubic
Fixes MiniMax CN Token Plan parsing to avoid showing limit 0 and correctly handle percent-only responses when counts are missing. Also updates docs to the new Token Plan endpoints and documents the percent output.
current_interval_remaining_percentwhen totals are missing; prefermodel_name: "general".used = 100 - remaining_percent,limit = 100, and keep the reset time.Written for commit 8fc2165. Summary will update on new commits.
Note
Low Risk
Scoped to MiniMax usage display parsing and provider docs; no auth or shared infrastructure changes.
Overview
Updates the MiniMax provider docs for the Token Plan
remainsAPI and documents when the Session line uses percent instead of prompt counts.The plugin no longer picks the first
model_remainsrow with a positive raw total. For CN, it ignores count rows whose totals would show as limit 0 after model-call-to-prompt scaling (e.g. tinyvideorows). When no displayable count exists, it usescurrent_interval_remaining_percent, preferringmodel_name: "general", and emits a percent progress line (used = 100 - remaining_percent,limit = 100). New tests cover CN percent-only payloads and row ordering.Reviewed by Cursor Bugbot for commit 8fc2165. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Release Notes
Documentation
Improvements